package com.qlm.config;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.kit.HttpKit;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.weixin.sdk.utils.JsonUtils;

public class BaiduApi {

	public static void main(String[] args) {
		query("武汉","循礼门","洪山广场");
	}
	
	public static String url = "http://api.map.baidu.com/direction/v1";
	
	public static List<Record> query(String city,String start,String end){
		Map<String, String> queryParas = new HashMap<String, String>();
		queryParas.put("origin", start);
		queryParas.put("destination", end);
		queryParas.put("mode", "transit");
		queryParas.put("region", city);
		queryParas.put("ak", "rMzX4zM4I0HWMsHY4P1lp6m9d5xfyV5L");
//		queryParas.put("output", "json");
		String post = HttpKit.post(url,queryParas, "");
		System.out.println(post);
		return null;
	}
}
